function getArgs(strParame) {
    var args = new Object( );
    var query = location.search.substring(1);


    var pairs = query.split("&"); // Break at ampersand
    for(var i = 0; i < pairs.length; i++) {
        var pos = pairs[i].indexOf("=");
        if (pos == -1) continue;
        var argname = pairs[i].substring(0,pos);
        var value = pairs[i].substring(pos+1);
        value = decodeURIComponent(value);
        args[argname] = value;
    }
    return args[strParame];
}


// 加载SVN列表
function getSvnList(pathUrl, target) {
    var htmldata = '';
    $.ajax({
        type: 'post',
        url: '/lenovohit-tianjin/svn/browser-out/',
        contentType: "application/json; charset=utf-8",
        dataType: 'json',
        data: JSON.stringify({
            path: pathUrl
        }),
        success: function (data) {
            $.each(data.data, function (i, item) {
                if(item.kind == 0) {
                    var childTarget = "child" + item.id;
                    htmldata += '<li><a  style = "color:red;text-underline: black" onclick="getSvnList(\''+ item.path +'\',\'' + childTarget + '\')">' + item.name + '//……</a></li>';
                    htmldata += '<p><ui id = "' + childTarget + '" style = "color:blue;"></ui></p>'
                }
                else {
                    htmldata += '<li style = "color:blue;">' + item.name + '</li>';
                }
            })
            $('#' + target).html(htmldata);
        },
        error: function () {
            alert('未找到路径');
        }
    });
}


